﻿namespace AbpZero.Web
{
    public class AjaxResponse<TResult> : AjaxResponseBase
    {
        public AjaxResponse()
        {
            Code = 200;
            Message = string.Empty;
        }

        public AjaxResponse(int code)
        {
            Code = code;
            Message = string.Empty;
        }

        public AjaxResponse(string message)
        {
            Code = 200;
            Message = message;
        }

        public AjaxResponse(TResult result)
        {
            Code = 200;
            Result = result;
        }

        public AjaxResponse(int code, string message)
        {
            Code = code;
            Message = message;
        }

        public AjaxResponse(int code, string message, string details)
        {
            Code = code;
            Message = message;
            Details = details;
        }

        public AjaxResponse(int code, string message, TResult result)
        {
            Code = code;
            Message = message;
            Result = result;
        }


        public TResult Result { get; set; }
    }
}